<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/pages/common/header.jsp"%>
<jdf:themeFile file="business/commercialInvoice.js" />
</head>
<body>
    <div class="contentBody contentborder">
        <div class="tab-pane" id="tabPane">
            <div id="message">${message }</div>
            <div class="tab-page">
                 <h1 class="tab">商业发票选择</h1>
                 <div class="contentborder">
                     <jdf:form bean="request" scope="request">
                        <form action="${dynamicDomain}/commercialInvoice/${action}" method="post">
                             <table class="inputTable">
                                <tr>
                                    <td nowrap class="label cancelBorderLeft">
                                        <label for="search_EQI_objectId">发票编号：</label>
                                    </td>
                                    <td class="content">
                                        <input type="text" name="search_EQI_objectId" />
                                    </td>
                                    <td nowrap class="label">
                                        <label for="search_LIKES_blNo">提单编号：</label>
                                    </td>
                                    <td class="content">
                                        <input type="text" name="search_LIKES_blNo" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="bottomLabel" nowrap colspan="4">
                                        <div class="right">
                                            <button type="reset">重置</button>
                                            <button type="submit">查询</button>
                                        </div>
                                    </td>
                             </table>
                        </form>
                    </jdf:form>
                </div>
                <div class="contentborder listArea">
                    <div class="toolBar">
                    </div>
                    <div id="tableDiv">
                        <jdf:table items="items" var="currentRowObject" retrieveRowsCallback="limit" filterRowsCallback="limit" sortRowsCallback="limit" action="${action}">
                            <jdf:export view="csv" fileName="商业发票.csv" tooltip="Export CSV" imageName="csv" />
                            <jdf:export view="xls" fileName="商业发票.xls" tooltip="Export EXCEL" imageName="xls" />
                            <jdf:row>
                                <jdf:column property="no" title="发票编号" style="width: 12%" />
                                <jdf:column property="orderNo" title="订单编号" style="width: 12%"/>
                                <jdf:column property="invoiceDate" title="开票日期" style="width: 10%"  cell="date"/>
                                <jdf:column property="customerId" title="客户" style="width: 15%">
                                  <jdf:columnCollectionValue items="customers"  nameProperty="name" value="${currentRowObject.customerId}"/>
                                </jdf:column>
                                <jdf:column property="blNo" title="提单编号" style="width: 8%"/>
                                <jdf:column alias="操作" sortable="false" viewsAllowed="html" style="width: 10%">
                                    <a href="javascript:select(${currentRowObject.objectId},'${currentRowObject.no}')" class="button">选择</a>
                                </jdf:column>
                            </jdf:row>
                        </jdf:table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
	    function select(customerId,name){
	        parent.$("#commercialInvoiceId").val(customerId).change();
	        parent.$("#commercialInvoiceNo").val(name);
	        parent.jQuery.fn.colorbox.close();
	    }
         
    </script>
</body>
</html>